import { createSlice } from '@reduxjs/toolkit'

// 创建redux的切片
const usersSlice = createSlice({
  name: 'global',
  initialState: {
    userName: '',
    uuid: '',
  },
  reducers: {
    setUserName: (state, actions) => {
      state.userName = actions.payload;
    }
  }
})

// 导出actions
export const { setUserName } = usersSlice.actions;

export default  usersSlice 
